package main

import (
	"encoding/json"
	"fmt"
)

func main() {
	m := make(map[string]interface{})
	m["Name"] = "法师"
	m["Age"] = 12
	m["Score"] = []int{12, 34}
	m["Address"] = "成都"

	//通过map转换出来的json是无序的
	slice, err := json.Marshal(m)
	if err != nil {
		fmt.Println("转换失败")
	} else {
		fmt.Println(string(slice))
	}
}
